/*
 * Singularity Engine
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */
package org.singularity.bom;


/**
 * TODO Describe this entity!
 * @author vjache
 */
public abstract class BinaryPredicate<TL,TR> extends Predicate
{
	private TL _leftOperand;
	private TR _rightOperand;
	/**
	 * @param aPredicateCode
	 */
	public BinaryPredicate(PredCode aPredicateCode, TL aLeftOperand, TR aRightOperand)
	{
		super(aPredicateCode);
		_leftOperand = aLeftOperand;
		_rightOperand = aRightOperand;
	}
	/**
	 * @return Returns the _leftOperand.
	 */
	public TL getLeftOperand()
	{
		return _leftOperand;
	}
	/**
	 * @param operand The _leftOperand to set.
	 */
	public void setLeftOperand(TL aOperand)
	{
		_leftOperand = aOperand;
	}
	/**
	 * @return Returns the _rightOperand.
	 */
	public TR getRightOperand()
	{
		return _rightOperand;
	}
	/**
	 * @param operand The _rightOperand to set.
	 */
	public void setRightOperand(TR aOperand)
	{
		_rightOperand = aOperand;
	}

	@Override
	public String toString()
	{
		return String.format("%s(%s, %s)",getPredicateCode(),getLeftOperand(),getRightOperand());
	}
	

}
